package com.aaa.system.controller;

import com.aaa.common.entity.Menu;
import com.aaa.common.vo.Result;
import com.aaa.system.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: aaa-hospital-parent
 * @description:
 * @author: 闫克起
 * @create: 2024-05-21 16:48
 **/
@RestController
@RequestMapping("/system/menu")
public class MenuController {
    @Autowired
    private MenuService menuService;
    @GetMapping("/leftMenu")
    public Result<List<Menu>> leftMenu(){
        //根据用户查询左侧菜单
        return menuService.findByUserId();
    }
}
